<template>
  <div id="header">
    <div class="top" @click="show = true">
      <div class="center">
        <div class="img">
          <img :src="seller.avatar" alt />
        </div>
        <div class="con">
          <div>
            <span>品牌</span>
            <p>{{seller.name}}</p>
          </div>
          <div>{{seller.description}}&emsp;/&emsp;{{seller.deliveryTime}}分钟送达</div>
          <div>
            <p>
              <span>减</span>在线支付满28减5&emsp;,&emsp;满50减10
            </p>
            <p>
              5个
              <van-icon name="arrow" />
            </p>
          </div>
        </div>
      </div>
      <div class="bottom">
        <span>公告</span>
        {{seller.bulletin}}
      </div>
    </div>
    <!-- 遮罩层 -->
    <Store :show="show" :seller="seller" @close="close"></Store>
      
  </div>
</template>
<script>
import Store from "@/components/StoreInformation/Store.vue"
export default {
  components:{Store},
  props: ["seller"],
  data(){
    return{
      show: false
    }
  },
  methods:{
    close(){
      this.show=false
    }
  }
};
</script>
<style lang="scss" scoped>
#header {
  width: 100%;
  height: 268px;
  .top {
    width: 100%;
    height: 100%;
    position: relative;
    background: #60666b;
    padding: 48px 24px 0px 48px;
    .center {
      width: 100%;
      height: 128px;
      display: flex;
      justify-content: space-between;
      .img {
        width: 128px;
        height: 128px;
        img {
          width: 100% !important;
          height: 100%;
        }
      }
      .con {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding-left: 32px;
        div {
          &:nth-of-type(1) {
            display: flex;
            span {
              font-size: 20px;
              color: white;
              margin-right: 12px;
              width: 56px;
              height: 32px;
              background: red;
              line-height: 32px;
              text-align: center;
            }
            p {
              font-size: 32px;
              color: rgb(255, 255, 255);
              font-weight: bold;
              line-height: 36px;
            }
          }
          &:nth-of-type(2) {
            font-size: 24px;
            color: white;
            font-weight: 200;
            line-height: 24px;
            margin-top: 16px;
            margin-bottom: 20px;
          }
          &:nth-of-type(3) {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 20px;
            color: white;
            font-weight: 200;
            p {
              &:nth-of-type(1) {
                display: flex;
                align-items: center;
                span {
                  margin-right: 8px;
                  display: block;
                  width: 30px;
                  height: 30px;
                  font-size: 16px;
                  color: red;
                  background: white;
                  font-weight: 200;
                  line-height: 30px;
                  text-align: center;
                }
              }
              &:nth-of-type(2) {
                width: 100px;
                height: 48px;
                background: rgba(0, 0, 0, 0.2);
                font-size: 20px;
                color: white;
                font-weight: 200;
                display: flex;
                align-items: center;
                border-radius: 30px;
                justify-content: space-evenly;
              }
            }
          }
        }
      }
    }
    .bottom {
      padding: 18px 24px;
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 56px;
      background: rgba(7, 17, 27, 0.2);
      overflow: hidden; /*超出部分隐藏*/
      text-overflow: ellipsis; /* 超出部分显示省略号 */
      white-space: nowrap; /*规定段落中的文本不进行换行 */
      width: 100%; /*需要配合宽度来使用*/
      font-size: 20px;
      color: white;
      font-weight: 200;
      span{
          float: left;
          margin-right: 8px;
          width: 50px;
          height:30px;
          font-size: 16px;
          color: #394149;
          font-weight: 700;
          background: white;
          line-height: 30px;
          text-align: center;
          display: block;
      }
    }
  }
}
</style>